const recursionRoutes = (menuList = [], allroutes = []) => {
    let userRoutes = []
    menuList.forEach(item => {
        allroutes.forEach(routes => {
            if (item.name === routes.meta.name) {
                if (item.children) {
                    routes.children= recursionRoutes(item.children, routes.children)
                }
                userRoutes.push(routes)
            }
        })
    })
    return userRoutes
}

export default recursionRoutes